package org.tea.inventory.db.dao;

import org.tea.inventory.db.domain.PortalUserInfo;
import org.apache.ibatis.annotations.Param;

public interface PortalUserInfoMapper {
    int deleteByPrimaryKey(Integer id);

    int insert(PortalUserInfo record);

    int insertSelective(PortalUserInfo record);

    PortalUserInfo selectByPrimaryKey(Integer id);

    int updateByPrimaryKeySelective(PortalUserInfo record);

    int updateByPrimaryKey(PortalUserInfo record);

    //根据手机号（loginId）查询用户
    PortalUserInfo selectUserInfoByLognId(@Param("loginId") String loginId);

    //根据用户名、密码查询用户
    PortalUserInfo selectByloginIdAndPassword(@Param("loginId") String loginId,
                                                        @Param("password") String password);

    //根据openId查询用户
    PortalUserInfo selectUserInfoByOpenId(@Param("openId") String openId);

    //更新用户性别
    int updateUserInfo(PortalUserInfo portalUserInfo);
}